A typical computing device employs a wide variety of executable program code to perform various tasks. For example, program code can be included as part of an operating system, an application, a utility, and/or other functionality that can be executed via a computing device. Such program code typically includes functions that can be called to perform various tasks. For example, a particular function can be called by an application to calculate a value based on parameters that are passed to the function.
In certain scenarios, it can be useful to intercept a call to a function and redirect the call to a replacement function. For example, a software testing utility can intercept a call to a function by an application. The utility can then redirect the call to a replacement function in order to test various operating scenarios that may arise when the application is executed. Current techniques for introducing replacement functions typically do not enable state information associated with a computing device to be easily provided to a replacement function, thus not fully realizing the value of the replacement function.